import { CLASS_PREFIX, CLASS_PLAYER, EVENT } from '../src/ts/constants'

describe('Constants', () => {
  test('class', () => {
    expect(CLASS_PREFIX).toBe('nplayer_')
    expect(CLASS_PLAYER).toBe('nplayer')
  })

  test('event', () => {
    expect(EVENT.ENTER_FULLSCREEN).toBe('EnterFullscreen')
    expect(EVENT.EXIT_FULLSCREEN).toBe('ExitFullscreen')
    expect(EVENT.WEB_ENTER_FULLSCREEN).toBe('WebEnterFullscreen')
    expect(EVENT.WEB_EXIT_FULLSCREEN).toBe('WebExitFullscreen')
    expect(EVENT.DURATION_CHANGE).toBe('DurationChange')
    expect(EVENT.RATE_CHANGE).toBe('RateChange')
    expect(EVENT.AFTER_INIT).toBe('AfterInit')
    expect(EVENT.PLAY).toBe('Play')
    expect(EVENT.PAUSE).toBe('Pause')
    expect(EVENT.ENDED).toBe('Ended')
    expect(EVENT.WAITING).toBe('Waiting')
    expect(EVENT.STALLED).toBe('Stalled')
    expect(EVENT.CANPLAY).toBe('Canplay')
    expect(EVENT.LOADED_METADATA).toBe('LoadedMetadata')
    expect(EVENT.ERROR).toBe('Error')
    expect(EVENT.SEEKED).toBe('Seeked')
    expect(EVENT.TIME_UPDATE).toBe('TimeUpdate')
    expect(EVENT.VOLUME_CHANGE).toBe('VolumeChange')
    expect(EVENT.PROGRESS).toBe('Progress')
    expect(EVENT.ENTER_PIP).toBe('EnterPip')
    expect(EVENT.EXIT_PIP).toBe('ExitPip')
    expect(EVENT.LOADING_SHOW).toBe('LoadingShow')
    expect(EVENT.LOADING_HIDE).toBe('LoadingHide')
    expect(EVENT.MOUNTED).toBe('Mounted')
    expect(EVENT.UPDATE_SIZE).toBe('UpdateSize')
    expect(EVENT.BEFORE_DISPOSE).toBe('BeforeDispose')
    expect(EVENT.UPDATE_OPTIONS).toBe('UpdateOptions')
    expect(EVENT.OPEN_EDGE).toBe('OpenEdge')
    expect(EVENT.CONTROL_SHOW).toBe('ControlShow')
    expect(EVENT.CONTROL_HIDE).toBe('ControlHide')
    expect(EVENT.CONTROL_ITEM_UPDATE).toBe('ControlItemUpdate')
    expect(EVENT.BP_CHANGE).toBe('BpChange')
  })
})
